Skip to content

feat: add lua disable config#11536

Merged
kylewanginchina merged 1 commit intomainfrom
feature-lua-disable
Apr 15, 2026
Merged

feat: add lua disable config#11536
kylewanginchina merged 1 commit intomainfrom
feature-lua-disable

Conversation

@qlndzt
Copy link
Copy Markdown
Collaborator

@qlndzt qlndzt commented Mar 27, 2026

This PR is for:

Agent

###Add lua disable config

Checklist

  • Added unit test.

Backport to branches

@qlndzt qlndzt force-pushed the feature-lua-disable branch from 35ca959 to bbd0ffa Compare April 1, 2026 02:48
@kylewanginchina
Copy link
Copy Markdown
Contributor

@claude review一下当前PR中的代码修改

@claude
Copy link
Copy Markdown
Contributor

claude bot commented Apr 15, 2026

Claude finished @kylewanginchina's task in 3m 56s —— View job


Todo

  • Read the changed files and diff
  • Analyze the PR for correctness and regressions
  • Post the review feedback

Review

我看完这次 PR 的改动了,当前没有发现明确的阻塞性问题

这次修改的主线是完整的:

  • 配置项增加了 inputs.ebpf.profile.languages.lua_disabled,默认值与现有 language profiler 开关风格一致,见 agent/src/config/config.rs:1209
  • Rust/C 常量映射补齐了 Lua feature index,见 agent/src/ebpf/mod.rs:126agent/src/ebpf/user/config.h:181
  • dispatcher 在启动 continuous profiler 前按开关决定是否为 Lua 设置 regex,从而控制 feature 生效,见 agent/src/ebpf_dispatcher.rs:1115
  • eBPF map 创建阶段也会基于 lua_profiler_enabled() 将 Lua 相关 map 降成 max_entries = 1,避免无谓内存占用,见 agent/src/ebpf/user/load.c:1341
  • 中英文文档和模板也同步了,见 server/agent_config/template.yaml:3901server/agent_config/README.md:5175server/agent_config/README-CH.md:5175

Suggestion

有一个非阻塞建议:

  • 这个 PR 的 checklist 里 Added unit test 还没有勾上。建议补一个最小覆盖,至少验证:
    1. lua_disabled: true/false 的配置反序列化,参考 agent/src/config/config.rs:1209
    2. 运行时开关传播到 dispatcher 的逻辑,参考 agent/src/ebpf_dispatcher.rs:1134

如果你希望我继续下一步,我可以直接帮你补一版针对这个配置链路的测试。
Fix this →

@kylewanginchina kylewanginchina merged commit 7a72b76 into main Apr 15, 2026
18 checks passed
@kylewanginchina kylewanginchina deleted the feature-lua-disable branch April 15, 2026 04:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants